# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-recipe-scrapers
pkgver=14.56.0
pkgrel=0
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=recipe-scrapers
pkgdesc="Python package, scraping recipes from all over the internet"
url="https://pypi.python.org/project/recipe-scrapers"
arch="noarch"
license="MIT"
depends="py3-beautifulsoup4 py3-extruct py3-isodate py3-requests"
checkdepends="py3-pytest py3-responses"
makedepends="py3-setuptools py3-gpep517 py3-wheel"
source="$pkgname-$pkgver.tar.gz::https://github.com/hhursev/recipe-scrapers/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
subpackages="$pkgname-pyc"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer "$builddir"/.dist/*.whl
	.testenv/bin/python3 -m pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
19fbc68d1b7f7a3d981541f5a98c4727119051ca2282295e4fde2d15e61e683db934f4238e77b2aa584ea9915ada09d14464ba88a44de777e228fa2280a38bb0  py3-recipe-scrapers-14.56.0.tar.gz
"
